<?php

namespace App\Http\Controllers\View;

use App\Http\Controllers\Controller;
use Illuminate\Support\Facades\Auth;

class BaseController extends Controller
{
    public function toHome()
    {
        $userPosts = [];

        if (Auth::check()) {
            $userPosts = Auth::user()->getPosts();
        }
        return view('base.home',compact('userPosts'));
    }


    public function toAbout()
    {
        return view('base.about');
    }

    public function toHelp()
    {
        return view('base.help');
    }

}
